from selenium.webdriver.common.by import By


class PageElement:
    #   输入手机号码
    mp_login_phone = (By.CSS_SELECTOR, 'input[placeholder="请输入手机号"]')
    #  输入验证码
    mp_login_verify = (By.CSS_SELECTOR, 'input[placeholder="验证码"]')
    # 登入按钮
    mp_login_btn = (By.CLASS_NAME, "el-button--primary")
    """自媒体-首页"""
    # 公司名字
    mp_home_company = (By.CLASS_NAME, 'company-container')
    # 内容管理
    mp_home_content_manage = (By.XPATH, "//div[@class='el-submenu__title']/span[text()='内容管理']")
    # 发布文章按钮
    mp_home_public_article = (By.XPATH, "//li[@class='el-menu-item' and contains(text(),'发布文章')]")
    """发布文章"""
    # 文章标题
    mp_public_article_title_css = (By.CSS_SELECTOR, 'input[placeholder="文章名称"]')
    # 文章内容
    mp_public_article_content_iframe_id = "publishTinymce_ifr"

    mp_public_article_content_id = (By.ID, "tinymce")
    # 封面
    mp_public_article_cover_xpath = (By.XPATH, "//span[@class='el-radio__label' and text()='无图']")
    # 频段选择按钮
    mp_public_article_select_btn_channel = (By.CSS_SELECTOR, 'input[placeholder="请选择"]')
    # 频道所有名字
    mp_public_article_channel__all_name = (By.CSS_SELECTOR, 'li.el-select-dropdown__item > span')
    # 渠道名字
    mp_public_article_channel_name = (By.XPATH, "//li[@class='el-select-dropdown__item']/span[text()='区块链']")
    # 点击发表按钮
    mp_public_article_publish_btn = (
        By.XPATH, "//button[contains(@class,'el-button--primary')]/span[text()='发表']")
